#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
using namespace std;
using pii = pair<int, int>;

const int N = 1e3 + 10, INF = 0x3f3f3f3f;

int n, m, k;
int m1, m2, cnt;
vector<pii> a, b;
double d[N][4], f[N][N];

double dis(pii a, pii b)
{
    int x = abs(a.first - b.first);
    int y = abs(a.second - b.second);
    return sqrt(x * x + y * y);
}

bool st[4] = { 0 };
double dfs(int t, pii now, double sum)
{
    if (t == 0) return sum + dis(now, b[4]);
    double res = INF;
    for (int i = 1;i <= 3;i++) {
        if (st[i]) continue;
        st[i] = 1;
        res = min(res, dfs(t - 1, b[i], sum + dis(now, b[i])));
        st[i] = 0;
    }
    return res;
}

void solve()
{
    cin >> n >> m >> k >> m1 >> m2;
    b.push_back({ 0,0 });a.push_back({ 0,0 });
    for (int i = 0;i < 4;i++) {
        int x, y; cin >> x >> y;
        b.push_back({ x,y });
    }
    for (int i = 0;i < k;i++) {
        int x, y; cin >> x >> y;
        a.push_back({ x,y });
    }
    cnt = max((n + m1 - 1) / m1, (m + m2 - 1) / m2);

    for (int t = 1;t <= 3;t++)
        for (int i = 1;i <= k;i++)
            d[i][t] = dfs(t, a[i], 0);

    for (int i = 0;i <= cnt;i++) f[0][i] = INF;
    f[0][0] = 0;

    for (int i = 1;i <= k;i++)
        for (int j = 0;j <= cnt;j++) {
            f[i][j] = f[i - 1][j];
            for (int t = 0;t <= 3;t++)
                if (j >= t) f[i][j] = min(f[i][j], f[i - 1][j - t] + d[i][t]);
        }
    cout << fixed << setprecision(10);
    cout << f[k][cnt];
}

signed main()
{
    //ios::sync_with_stdio(0);
    //cin.tie(0);cout.tie(0);
#define ONLINE_JUDGE
#ifndef ONLINE_JUDGE
    std::istringstream in(R"()");
    std::cin.rdbuf(in.rdbuf());
#endif
    int T = 1;
    //cin>>T;
    for (int i = 1;i <= T;i++) {
        solve();
    }
}

